package com.scs.application.modules.base.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.base.dto.ExpandColumnDTO;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 *
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "包模板表")
@TableName("base_pack_templet")
public class PackTemplet extends DataEntity {

    @EntityFieldAnnotation(
            text = "base_pack_type.id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String packTypeId;

    @EntityFieldAnnotation(
            text = "模板类型",
            length = "50",
            not_null = true,
            default_value = "",
            comment = "模板类型"
    )
    private String packTypeName;

    @EntityFieldAnnotation(
            text = "模板类型",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String packType;

    @EntityFieldAnnotation(
            text = "供应商id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    @TableField(strategy = FieldStrategy.IGNORED)
    private String supplierId;

    @EntityFieldAnnotation(
            text = "供应商",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "供应商"
    )
    @TableField(strategy = FieldStrategy.IGNORED)
    private String supplierName;

    @EntityFieldAnnotation(
            text = "科室id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    @TableField(strategy = FieldStrategy.IGNORED)
    private String deptId;

    @EntityFieldAnnotation(
            text = "科室",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    @TableField(strategy = FieldStrategy.IGNORED)
    private String deptName;

    @EntityFieldAnnotation(
            text = "包代码",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String code;

    @EntityFieldAnnotation(
            text = "包名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String name;

    @EntityFieldAnnotation(
            text = "版本号",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Integer version;

    @EntityFieldAnnotation(
            text = "备注",
            length = "255",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "金额",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amount;

    @EntityFieldAnnotation(
            text = "医生id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String doctorId;

    @EntityFieldAnnotation(
            text = "医生名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String doctorName;

    @EntityFieldAnnotation(
            text = "drgs分组",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Integer drgsId;

    @EntityFieldAnnotation(
            text = "状态 1：已禁用 0：有效",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Integer flagDisable;


    @TableField(exist = false)
    private String packTempletId;

    @TableField(exist = false)
    private Boolean showExpand;

    @EntityFieldAnnotation(
            text = "HIS编码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = "HIS编码"
    )
    private String hisCode;

    @EntityFieldAnnotation(
            text = "HIS名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "HIS名称"
    )
    private String hisName;

    @TableField(exist = false)
    private List<PackTempletItem> childData;

    @TableField(exist = false)
    private List<ExpandColumnDTO> childCols;


    // 明细数量
    @TableField(exist = false)
    private int countDtl;
}
